<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MyBatis-Plus 深度解析</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .feature-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.18);
        }
        
        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        }
        
        .code-block {
            background: #1e1e1e;
            color: #d4d4d4;
            border-radius: 12px;
            overflow: hidden;
        }
        
        .code-header {
            background: #2d2d2d;
            padding: 10px 20px;
            font-size: 14px;
            color: #888;
            border-bottom: 1px solid #3e3e3e;
        }
        
        pre {
            margin: 0;
            padding: 20px;
            overflow-x: auto;
        }
        
        .keyword { color: #569cd6; }
        .string { color: #ce9178; }
        .comment { color: #6a9955; }
        .annotation { color: #dcdcaa; }
        
        .section-title {
            position: relative;
            display: inline-block;
        }
        
        .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 0;
            width: 60px;
            height: 4px;
            background: linear-gradient(90deg, #667eea, #764ba2);
            border-radius: 2px;
        }
        
        .mermaid {
            display: flex;
            justify-content: center;
            margin: 2rem 0;
        }
        
        .floating-icon {
            animation: float 3s ease-in-out infinite;
        }
        
        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }
        
        .gradient-text {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-6">
        <div class="max-w-6xl mx-auto">
            <div class="text-center">
                <div class="floating-icon inline-block mb-6">
                    <i class="fas fa-database text-6xl opacity-90"></i>
                </div>
                <h1 class="text-5xl md:text-6xl font-bold mb-6" style="font-family: 'Noto Serif SC', serif;">
                    MyBatis-Plus
                </h1>
                <p class="text-xl md:text-2xl opacity-90 max-w-3xl mx-auto leading-relaxed">
                    为简约而生，让 MyBatis 的使用更加优雅
                </p>
                <div class="mt-8 flex justify-center space-x-6">
                    <div class="text-center">
                        <i class="fas fa-rocket text-3xl mb-2"></i>
                        <p class="text-sm">极速开发</p>
                    </div>
                    <div class="text-center">
                        <i class="fas fa-code text-3xl mb-2"></i>
                        <p class="text-sm">代码简洁</p>
                    </div>
                    <div class="text-center">
                        <i class="fas fa-shield-alt text-3xl mb-2"></i>
                        <p class="text-sm">功能强大</p>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Introduction Section -->
    <section class="py-16 px-6">
        <div class="max-w-4xl mx-auto">
            <div class="bg-white rounded-2xl shadow-xl p-10">
                <h2 class="section-title text-3xl font-bold mb-8 gradient-text">什么是 MyBatis-Plus？</h2>
                <p class="text-lg leading-relaxed text-gray-700 mb-6">
                    MyBatis-Plus 是一个基于 MyBatis 的增强工具，旨在简化 MyBatis 的使用，同时提供了一些便捷的功能，以提高开发效率。它在 MyBatis 的基础上，增加了许多自动化和简化操作的功能，使得开发人员可以更快速地进行数据访问层的开发。
                </p>
                <div class="bg-gradient-to-r from-purple-50 to-indigo-50 rounded-xl p-6 mt-6">
                    <p class="text-gray-600 italic">
                        <i class="fas fa-quote-left text-purple-400 mr-2"></i>
                        只做增强不做改变，引入它不会对现有工程产生影响，如丝般顺滑。
                        <i class="fas fa-quote-right text-purple-400 ml-2"></i>
                    </p>
                </div>
            </div>
        </div>
    </section>

    <!-- Architecture Diagram -->
    <section class="py-16 px-6 bg-gray-50">
        <div class="max-w-6xl mx-auto">
            <h2 class="section-title text-3xl font-bold mb-12 text-center gradient-text">架构概览</h2>
            <div class="bg-white rounded-2xl shadow-lg p-8">
                <div class="mermaid">
                    graph TB
                        A[应用层] --> B[MyBatis-Plus]
                        B --> C[MyBatis]
                        C --> D[JDBC]
                        D --> E[数据库]
                        
                        B --> F[自动CRUD]
                        B --> G[条件构造器]
                        B --> H[分页插件]
                        B --> I[代码生成器]
                        B --> J[性能分析]
                        
                        style A fill:#667eea,stroke:#fff,color:#fff
                        style B fill:#764ba2,stroke:#fff,color:#fff
                        style C fill:#f093fb,stroke:#333
                        style D fill:#f5576c,stroke:#333
                        style E fill:#4facfe,stroke:#333
                </div>
            </div>
        </div>
    </section>

    <!-- Key Features Section -->
    <section class="py-16 px-6">
        <div class="max-w-6xl mx-auto">
            <h2 class="section-title text-3xl font-bold mb-12 text-center gradient-text">核心特性</h2>
            <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
                <!-- Feature 1 -->
                <div class="feature-card rounded-xl p-6">
                    <div class="text-purple-600 mb-4">
                        <i class="fas fa-magic text-3xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3">自动化的 CRUD 操作</h3>
                    <p class="text-gray-600 leading-relaxed">
                        提供了基本的 CRUD 操作方法，如 <code class="bg-gray-100 px-2 py-1 rounded text-sm">selectById</code>、<code class="bg-gray-100 px-2 py-1 rounded text-sm">insert</code>、<code class="bg-gray-100 px-2 py-1 rounded text-sm">updateById</code>、<code class="bg-gray-100 px-2 py-1 rounded text-sm">deleteById</code> 等，通过继承 BaseMapper 接口自动实现。
                    </p>
                </div>

                <!-- Feature 2 -->
                <div class="feature-card rounded-xl p-6">
                    <div class="text-indigo-600 mb-4">
                        <i class="fas fa-file-alt text-3xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3">内置分页插件</h3>
                    <p class="text-gray-600 leading-relaxed">
                        提供了简单易用的分页功能，通过配置分页插件，可以轻松实现数据的分页查询。支持多种数据库，自动处理 SQL 的分页逻辑。
                    </p>
                </div>

                <!-- Feature 3 -->
                <div class="feature-card rounded-xl p-6">
                    <div class="text-pink-600 mb-4">
                        <i class="fas fa-filter text-3xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3">条件构造器</h3>
                    <p class="text-gray-600 leading-relaxed">
                        提供了 QueryWrapper 和 UpdateWrapper 等条件构造器，用于构建动态查询和更新条件。支持链式调用，使得构造查询条件更加直观和简洁。
                    </p>
                </div>

                <!-- Feature 4 -->
                <div class="feature-card rounded-xl p-6">
                    <div class="text-blue-600 mb-4">
                        <i class="fas fa-cog text-3xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3">代码生成器</h3>
                    <p class="text-gray-600 leading-relaxed">
                        内置了代码生成器，可以根据数据库表自动生成实体类、Mapper 接口、Mapper XML 文件等。大大提高了开发效率，减少了手动编写代码的工作量。
                    </p>
                </div>

                <!-- Feature 5 -->
                <div class="feature-card rounded-xl p-6">
                    <div class="text-green-600 mb-4">
                        <i class="fas fa-trash-restore text-3xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3">逻辑删除支持</h3>
                    <p class="text-gray-600 leading-relaxed">
                        提供了逻辑删除的功能，通过配置可以实现数据的逻辑删除而不是物理删除。支持自动处理逻辑删除标记字段，方便数据的恢复和管理。
                    </p>
                </div>

                <!-- Feature 6 -->
                <div class="feature-card rounded-xl p-6">
                    <div class="text-red-600 mb-4">
                        <i class="fas fa-chart-line text-3xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3">性能分析</h3>
                    <p class="text-gray-600 leading-relaxed">
                        提供了性能分析插件，可以帮助开发人员查看 SQL 执行的时间、SQL 语句和参数等信息。有助于优化 SQL 查询性能，进行性能调优。
                    </p>
                </div>
            </div>
        </div>
    </section>

    <!-- Use Cases Section -->
    <section class="py-16 px-6 bg-gradient-to-br from-purple-50 to-indigo-50">
        <div class="max-w-5xl mx-auto">
            <h2 class="section-title text-3xl font-bold mb-12 text-center gradient-text">使用场景</h2>
            <div class="grid md:grid-cols-2 gap-8">
                <div class="bg-white rounded-xl p-6 shadow-lg">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-rocket text-purple-600 text-2xl mr-3"></i>
                        <h3 class="text-xl font-bold">开发效率提升</h3>
                    </div>
                    <p class="text-gray-600">适用于希望减少 MyBatis 开发中繁琐操作的项目，尤其是 CRUD 操作较多的项目。</p>
                </div>
                
                <div class="bg-white rounded-xl p-6 shadow-lg">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-layer-group text-indigo-600 text-2xl mr-3"></i>
                        <h3 class="text-xl font-bold">快速构建数据访问层</h3>
                    </div>
                    <p class="text-gray-600">在需要快速构建数据访问层时，MyBatis-Plus 的自动化和代码生成器可以极大地提高开发效率。</p>
                </div>
                
                <div class="bg-white rounded-xl p-6 shadow-lg">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-database text-pink-600 text-2xl mr-3"></i>
                        <h3 class="text-xl font-bold">逻辑删除和分页功能</h3>
                    </div>
                    <p class="text-gray-600">当项目中需要处理